-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(webapp): Annotations flot plugin #1605
Conversation
size-limit report 📦
|
/create-server |
webapp/javascript/components/TimelineChart/Annotations.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/TimelineChartWrapper.tsx
Outdated
Show resolved
Hide resolved
ea774c2
to
757cbb3
Compare
Codecov ReportBase: 66.59% // Head: 66.61% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1605 +/- ##
==========================================
+ Coverage 66.59% 66.61% +0.03%
==========================================
Files 148 146 -2
Lines 5030 4965 -65
Branches 1162 1142 -20
==========================================
- Hits 3349 3307 -42
+ Misses 1676 1653 -23
Partials 5 5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
/create-server |
1 similar comment
/create-server |
/create-server |
/create-server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious to hear your thoughts on why you preferred to draw on the canvas VS rendering Icons using React.
I think shouldStartAnnotationsFunctionality
is unnecessary. If it's empty we don't render annotations, if it's not empty we render them. An array either has items or does not has items. Adding a third null
state is unnecessary. If we need to control whether the entire plugin is activated or not, then we can create another variable enableAnnotationsPlugin
or something, although I don't think this is necessary.
I know you have your own preferences, but for consistency let's use function
instead of lambda functions.
webapp/javascript/components/TimelineChart/Annotations.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/Annotations.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/Annotations.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/Annotations.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/Annotations.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/Annotations.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/TimelineChartWrapper.tsx
Outdated
Show resolved
Hide resolved
@eh-am annotation marks (square + icon) moved outside of Flot, now it's React Component. I found a way how to position them over the timeline correctly. it used to be a problem they lost correct positioning when user changes browser window width |
/create-server |
Yeah I agree with @eh-am that the "read" modal fields should both have dark backgrounds https://user-images.githubusercontent.com/6951209/195377738-74f88832-a8ca-4b98-b4c7-a95de64c04e2.png Maybe eventually we'll add an edit button but that will be separate |
af88b7b
to
0df0419
Compare
@eh-am , @Rperry2174 , made this input dark |
/create-server |
b4e654f
to
03ef37f
Compare
webapp/javascript/pages/continuous/contextMenu/AnnotationInfo.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/pages/continuous/contextMenu/AnnotationInfo.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/pages/continuous/contextMenu/useAnnotationForm.ts
Outdated
Show resolved
Hide resolved
webapp/javascript/pages/continuous/contextMenu/AddAnnotation.menuitem.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/Annotations.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/AnnotationMark/index.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/AnnotationMark/index.tsx
Outdated
Show resolved
Hide resolved
<ContextMenu | ||
click={{ ...pos }} | ||
containerEl={containerEl} | ||
timestamp={Math.round(pos.x / 1000)} | ||
/>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very interesting, I thought we needed the Provider
there since this is rendered outside our normal react app! But it works without it... weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need provider if you want to import any kind of redux logic inside of the body of context menu (for example, redux selectors, useDispatch etc.). but in fact it executes functions which are already were initialized in components connected to redux. You can just take a look at webapp/javascript/pages/ContinuousSingleView.tsx
. function dispatch
was initialized in ContinuousSingleView
, you just execute it in ContextMenu "env"
webapp/javascript/components/TimelineChart/ContextMenu.plugin.tsx
Outdated
Show resolved
Hide resolved
webapp/javascript/components/TimelineChart/AnnotationMark/index.tsx
Outdated
Show resolved
Hide resolved
@eh-am sorry, probably I deleted comments accidentally during dev process and then forgot to revert them |
/create-server |
/create-server |
/create-server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Brief
Changes
screencast.2022-10-12.14-33-30.mp4
https://pr-1605.pyroscope.io/?query=rideshare-app-golang.alloc_objects%7B%7D
Concerns